package com.junlong0716.enjoylearning.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.junlong0716.enjoylearning.R
import com.junlong0716.enjoylearning.entity.KnowledgeListEntity

/**
 *@author: 巴黎没有摩天轮Li
 *@description:
 *@date: Created in 下午9:39 2018/5/11
 *@modified by:
 */
class KnowledgeListAdapter(data:ArrayList<KnowledgeListEntity>,resLayout:Int):BaseQuickAdapter<KnowledgeListEntity,BaseViewHolder>(resLayout,data){
    override fun convert(helper: BaseViewHolder?, item: KnowledgeListEntity?) {
        helper!!.setText(R.id.tv_title,item!!.title)
        helper.setText(R.id.tv_record_count,"${item.count}条记录")
        helper.setBackgroundRes(R.id.iv_icon,item.iconRes)
    }
}